package es.ucm.fdi.isbc.marcado.vista;

import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

import jcolibri.method.gui.utils.WindowUtils;
import jcolibri.util.OntoBridgeSingleton;
import es.ucm.fdi.gaia.ontobridge.test.gui.PnlConceptsAndInstancesTree;

public class FormPrincipal extends JFrame {

	private static final long serialVersionUID = 1L;

	public FormPrincipal(String titulo) {
		super(titulo);
		init();
	}
	
	private void init() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setSize(1000, 500);
		getContentPane().setLayout(new BorderLayout());
		getContentPane().add(new PnlConceptsAndInstancesTree(OntoBridgeSingleton.getOntoBridge(), true), BorderLayout.WEST);
		getContentPane().add(new PanelTabs(), BorderLayout.CENTER);
		
		addWindowListener(new WindowAdapter() {
			
            public void windowClosing(WindowEvent e) {
            	System.exit(0);
            }
        });
		WindowUtils.centerWindow(this);
	}

}
